<?php 
if (!defined('BASEPATH')){
	exit('No direct script access allowed');
}

/**
 * Geological Controller
 * Build by Phuc Nguyen
 * Contact : nguyenvanphuc0626@gmail.com
 */

class Geological extends BACKEND_Controller {

	public function __construct() {
		parent::__construct();
		$this->load->language('geological');
		$this->load->language('button');
		if($this->database_connect_status){
			$this->load->model('geological_model');
			$this->set_controller('geological');
			$this->set_model($this->geological_model);
		}
	}
        
        public function getDistrictByProvince(){
            if($this->input->server('REQUEST_METHOD')=='POST'){
                $result = $this->geological_model->getListDistrict($this->input->post('province'));
                if($result){
                    echo json_encode($result);exit;
                } else {
                    die("");
                }
            }
            die("");
        }
}